﻿using System;
using System.Collections.Generic;

namespace SmartLib.Extensions
{
	/// <summary>
	/// 
	/// </summary>
	public static class EnumerableExtensions
	{
		/// <summary>
		/// Invokes the method for each item in collection
		/// </summary>
		/// <typeparam name="T"></typeparam>
		/// <param name="sender">The sender.</param>
		/// <param name="method">The method.</param>
		public static void ForEach<T>(this IEnumerable<T> sender, Action<T> method)
		{
			foreach (var item in sender)
			{
				method(item);
			}
		}
	}
}
